package com.capgemini.cn.authority.rest.valueobject.data;

import com.capgemini.cn.authority.data.entity.Authorities;
import com.capgemini.cn.authority.data.entity.Groups;
import com.capgemini.cn.authority.data.entity.Roles;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.List;

/**
 * Created at 2017/9/21
 *
 * @author Andriy
 */
@ApiModel(value = "角色值对象")
@JsonSerialize
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@NoArgsConstructor
public class RoleVO extends Roles {

    public RoleVO(String roleName) {
        super(roleName);
    }

    @JsonIgnore
    @Override
    public List<Groups> getGroupsList() {
        return super.getGroupsList();
    }

    @JsonIgnore
    @Override
    public List<Authorities> getAuthorities() {
        return super.getAuthorities();
    }

    @ApiModelProperty(value = "角色名称")
    @Override
    public String getRoleName() {
        return super.getRoleName();
    }

    @ApiModelProperty(value = "角色主键值")
    @Override
    public long getId() {
        return super.getId();
    }

    @ApiModelProperty(value = "角色创建时间")
    @Override
    public Timestamp getCreateTime() {
        return super.getCreateTime();
    }

    @ApiModelProperty(value = "角色信息最后更新时间")
    @Override
    public Timestamp getUpdateTime() {
        return super.getUpdateTime();
    }
}
